/**
 * 
 */
package com.hawkfly.interceptor;

import java.util.Map;

import com.wbcs.config.component.application.report.ReportBean;
import com.wbcs.jbsf.util.Wbcs4JBSFUtil;
import com.wbcs.system.ReportRequest;
import com.wbcs.system.assistant.EditableReportAssistant;
import com.wbcs.system.component.application.report.configbean.editablereport.AbsEditActionBean;
import com.wbcs.system.component.application.report.configbean.editablereport.AbsEditableReportEditDataBean;
import com.wbcs.system.component.application.report.configbean.editablereport.InsertSqlActionBean;
import com.wbcs.system.intercept.AbsInterceptorDefaultAdapter;

/**
 * 仅用于from报表类型
 * @author hawkfly
 *
 */
public class ItprParseParamsToUpdateAuthes extends AbsInterceptorDefaultAdapter
{
    @Override
	public int doSavePerAction(ReportRequest rrequest,ReportBean rbean,Map<String,String> mRowData,Map<String,String> mParamValues,
            AbsEditActionBean actionbean,AbsEditableReportEditDataBean editbean)
    {
        if(actionbean instanceof InsertSqlActionBean){
            return Wbcs4JBSFUtil.doSavePerAction(rrequest, rbean, mRowData, mParamValues, actionbean, editbean, "authorizecode", new String[]{"code"});
        }else
            return EditableReportAssistant.getInstance().doSavePerAction(rrequest,rbean,mRowData,mParamValues,actionbean,editbean);
    }
}

